var t = require;
var e = module;
var o = exports;
var n =
        (this && this.__extends) ||
        (function () {
            var t = function (e, o) {
                return (t =
                    Object.setPrototypeOf ||
                    ({__proto__: []} instanceof Array &&
                        function (t, e) {
                            t.__proto__ = e;
                        }) ||
                    function (t, e) {
                        for (var o in e) e.hasOwnProperty(o) && (t[o] = e[o]);
                    })(e, o);
            };
            return function (e, o) {
                function n() {
                    this.constructor = e;
                }
                t(e, o), (e.prototype = null === o ? Object.create(o) : ((n.prototype = o.prototype), new n()));
            };
        })(),
    r =
        (this && this.__decorate) ||
        function (t, e, o, n) {
            var r,
                a = arguments.length,
                i = a < 3 ? e : null === n ? (n = Object.getOwnPropertyDescriptor(e, o)) : n;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) i = Reflect.decorate(t, e, o, n);
            else
                for (var s = t.length - 1; s >= 0; s--)
                    (r = t[s]) && (i = (a < 3 ? r(i) : a > 3 ? r(e, o, i) : r(e, o)) || i);
            return a > 3 && i && Object.defineProperty(e, o, i), i;
        };
Object.defineProperty(o, "__esModule", {value: !0}), (o.FakeFriend = void 0);
var a = t("ConfS"),
    i = t("Const"),
    s = t("OpenDataContexts"),
    c = t("Platforms"),
    l = t("Popup"),
    u = t("Sounds"),
    p = cc._decorator,
    f = p.ccclass,
    d =
        (p.property,
        (function (t) {
            function e() {
                return (null !== t && t.apply(this, arguments)) || this;
            }
            return (
                n(e, t),
                (e.prototype.init = function () {
                    var t = this,
                        e = this.node.getChildByName("container");
                    if (
                        ((this.head = e.getChildByName("head").getComponent(cc.Sprite)),
                        (this.icon = e.getChildByName("icon")),
                        (this.info = e.getChildByName("info").getComponent(cc.Sprite)),
                        (this.lingqu = e.getChildByName("lingqu")),
                        this.lingqu.on(cc.Node.EventType.TOUCH_END, function () {
                            u.Sounds.playFX("点击"),
                                i.default.addMoney(
                                    a.DatasManager.好友助力奖励货币,
                                    a.DatasManager.每邀请一位好友送出奖励数,
                                    "好基友送温暖",
                                    t.icon,
                                    null
                                ),
                                c.default.userStorage.setDirty(),
                                (t.lingqu.active = !1);
                        }),
                        (this.give = e.getChildByName("give")),
                        this.give.on(cc.Node.EventType.TOUCH_END, function () {
                            u.Sounds.playFX("点击"), s.default.clickFakeFriend();
                        }),
                        (this.close = e.getChildByName("close")),
                        this.close.on(cc.Node.EventType.TOUCH_END, function () {
                            u.Sounds.playFX("点击"), t.hide();
                        }),
                        (this.odc = s.default.get(2048, 2048)),
                        this.odc)
                    ) {
                        var o = this.odc.children[0].getComponent(cc.Sprite).spriteFrame.getTexture(),
                            n = new cc.SpriteFrame(o, new cc.Rect(0, 0, 100, 100));
                        (this.head.spriteFrame = n),
                            (n = new cc.SpriteFrame(o, new cc.Rect(110, 0, 400, 80))),
                            (this.info.spriteFrame = n);
                    }
                }),
                (e.prototype.show = function () {
                    t.prototype.show.call(this),
                        (this.lingqu.active = !0),
                        this.odc &&
                            s.default.draw(this.odc, {
                                op: "drawFakeFriend",
                                货币名称: a.DatasManager.好友助力奖励货币名称,
                                货币数量: a.DatasManager.每邀请一位好友送出奖励数
                            });
                }),
                (e.prototype.showComplete = function () {
                    t.prototype.showComplete.call(this);
                }),
                (e.prototype.hide = function () {
                    t.prototype.hide.call(this);
                }),
                (e.prototype.hideComplete = function () {
                    t.prototype.hideComplete.call(this);
                }),
                (e = r([f], e))
            );
        })(l.Popup));
o.FakeFriend = d;
